#!/bin/sh

# detect home directory
TMP=`dirname $0`
cd ${TMP}
PWD=`pwd`
export ANTI_PROXY_HOME=$PWD

echo "AntiProxy is located in ${PWD} - hope thats right!"

# detect java
JAVA=`which java`
echo "using following java: ${JAVA}"

# create classpath 
CLASSPATH="${PWD}/libs/ant.jar:${PWD}/libs/ant-launcher.jar"

# create log directory
if [ ! -d ${PWD}/logs ]; then
 mkdir ${PWD}/logs
fi

${JAVA} -classpath libs/ant/ant-launcher.jar:libs/ant/ant.jar org.apache.tools.ant.launch.Launcher